<template>
    <div class="content">
        <div class="top">
            <div class="gradient-text">{{ titletext }}</div>
        </div>
        <slot></slot>
        <div class="bottom"></div>
    </div>
</template>

<script setup lang="ts">
import { ref, reactive, computed, watch, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
const props = defineProps({
    titletext: {
        type: String,
    },
})
</script>

<style lang="scss" scoped>
.gradient-text {
    font-weight: 700;
    font-style: italic;
    font-family: YouSheBiaoTiHei;
    box-sizing: border-box;
    padding-top: 4px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 18px;
    padding-left: 30px;
    background: linear-gradient(180deg, #FFFFFF 27%, #90DEFF 100%);
    /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
    -webkit-background-clip: text;
    /*将设置的背景颜色限制在文字中*/
    -webkit-text-fill-color: transparent;
    /*给文字设置成透明*/
}

.content {
    width: 100%;
    position: relative;
    min-height: 100px;
    box-sizing: border-box;
    padding: 50px 0 10px;
}

.top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    background-image: url('../assets/img/title-top.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    box-sizing: border-box;
    background-image: url('../assets/img/title-bottom.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
</style>